<template>
  <Header title="地址管理"></Header>
  <van-address-list v-model="chosenAddressId" :list="state.list" :disabled-list="disabledList" default-tag-text="默认"
    @add="onAdd" @edit="onEdit" />
</template>

<script setup>
import { reactive } from 'vue';
import Header from '../components/Header.vue'
import { showToast } from 'vant';
import {getAddressList} from '../api/service/address.js'
const state = reactive({
  list: [{
    id: '1',
    name: '张三',
    tel: '13000000000',
    address: '浙江省杭州市西湖区文三路 138 号东方通信大厦 7 楼 501 室',
    isDefault: true,
  }]
})

const onAdd = () => showToast('新增地址');
const onEdit = (item, index) => showToast('编辑地址:' + index);


</script>

<style lang="less" scoped></style>